<#if !startCreateDate?has_content>
    <#assign startCreateDate=(.now?long-7*24*3600*1000)?number_to_date/>
</#if>
<@_workload channel='web_manager' operate='save.content' startCreateDate=startCreateDate endCreateDate=endCreateDate workloadType=workloadType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'log.create_date'/>:</label>
                    <input type="text" name="startCreateDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startCreateDate!}" />
                    <span>-</span>
                    <input type="text" name="endCreateDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endCreateDate!}" />
                </li>
                <li>
                    <label><@t.page 'analytics.type'/>:</label>
                    <select class="combox" name="workloadType">
                        <option value="dept"${(!(workloadType?has_content)||"dept"=workloadType)?then(' selected="true"','')?no_esc}><@t.page 'dept'/></option>
                        <option value="user"${(workloadType?has_content&&"user"=workloadType)?then(' selected="true"','')?no_esc}><@t.page 'user'/></option>
                    </select>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                    <li>
                        <a class="button" href="logOperate/export?channel=web_manager&operate=save.content&_csrf=<@_csrfToken admin=true/>" target="dwzExport" targetType="navTab"><i class="icon-download-alt icon-large"></i> <@t.page 'button.export'/></a>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
        </ul>
    </div>
    <table class="table" width="100%" layoutH="92">
        <thead>
            <tr>
                <th><@t.page 'dept'/></th>
                <th><@t.page 'user'/></th>
                <th><@t.page 'content.count'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.userId!/>
                <@t.merge 'deptIds' a.deptId!/>
            </#list>

            <@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
            <@_sysDept ids=t.deptIds!><#assign deptMap=map!/></@_sysDept>

            <#list page.list as a>
            <tr>
                <td class="center exclude-translate">
                    ${(deptMap[a.deptId?string].name)!}
                </td>
                <td class="center exclude-translate">
                    ${(userMap[a.userId?string].nickName)!}
                </td>
                <td class="center">${a.count!}</td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@_workload>